﻿<%@ Page Language="VB" MasterPageFile="~/promocionVenta.master" AutoEventWireup="false"
    CodeFile="consultaEstadoVentas.aspx.vb" Inherits="reportes_consultaEstadoVentas"
    Title=" .:: EVOLTA | Promoción ::. " %>

<%@ MasterType VirtualPath="~/promocionVenta.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Assembly="Flan.Controls" Namespace="Flan.Controls" TagPrefix="flan" %>
<%@ Register Assembly="ExtGridView" Namespace="ExGridView" TagPrefix="exGV" %>
<%@ OutputCache Duration="15" VaryByParam="none" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .filaEncabezadoPrincipal
        {
            background-image: url('../imagenes/px_td.jpg');
            width: 100%;
            background-repeat: repeat;
        }
        .filaEncabezadoTitulo
        {
            background-image: url('../imagenes/submenu3.PNG');
            background-repeat: repeat;
        }
        .filaEncabezado
        {
            background-image: url('../imagenes/submenu3.PNG');
            width: 100%;
            background-repeat: repeat;
        }
        .colGrilla
        {
            background-image: url('../imagenes/submenu2.PNG');
            height: 20px;
            background-repeat: repeat;
        }
        .style1
        {
            width: 215px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table style="width: 100%; background-color: #f4f4f4;" cellspacing="0">
        <tr class="filaEncabezadoPrincipal">
            <td>
                <table width="100%">
                    <tr>
                        <td>
                            <asp:Label ID="Label1" runat="server" CssClass="CeldaTituloTexto" 
                                Text="Status de Ventas de Paz Centenario"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlRptVentas" runat="server" Width="100%">
        <table style="width: 100%; background-color: #f4f4f4" cellspacing="0" border="1"
            cellpadding="0">
            <tbody>
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right">
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                </td>
                                <td width="10">
                                </td>
                                <td width="10">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label91" runat="server" Text="Vendedor :" SkinID="lblNormal"></asp:Label>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:UpdatePanel ID="upVendedor" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <select id="selVendedor" name="D1" runat="server" class="CssddlNormal">
                                            </select>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    Tipo de Cambio:
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td align="left">                                    
                                    <asp:TextBox ID="txtTipoCambio" SkinID="txtNormalObligatorioSkin" runat="server" Width="100px" onkeypress="return NumerosDecimales(this,2);"></asp:TextBox>
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label6" runat="server" SkinID="lblNormal" Text="Fecha Venta Inicial : "></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:UpdatePanel ID="upFchInicio" runat="server" UpdateMode="Always">
                                        <ContentTemplate>
                                            <asp:TextBox ID="txtFchInicio" runat="server" SkinID="txtNormalObligatorioSkin" Width="100px"></asp:TextBox>
                                            <asp:ImageButton ID="imgFchInicio" runat="server" ImageUrl="~/imagenes/Procesos/calendario.png" />
                                            <ajax:MaskedEditExtender ID="MExtFchInicio" runat="server" CultureAMPMPlaceholder=""
                                                CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                                                CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                                Enabled="True" Mask="99/99/9999" MaskType="Date" TargetControlID="txtFchInicio"
                                                UserDateFormat="DayMonthYear">
                                            </ajax:MaskedEditExtender>
                                            <ajax:CalendarExtender ID="CExtFchInicio" runat="server" Format="dd/MM/yyyy" PopupButtonID="imgFchInicio"
                                                TargetControlID="txtFchInicio">
                                            </ajax:CalendarExtender>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label27" runat="server" SkinID="lblNormal" Text="Fecha Venta Final : "></asp:Label>
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:UpdatePanel ID="upFchFin" runat="server" UpdateMode="Always">
                                        <ContentTemplate>
                                            <asp:TextBox ID="txtFchFin" runat="server" SkinID="txtNormalObligatorioSkin" Width="100px"></asp:TextBox>
                                            <asp:ImageButton ID="imgFchFin" runat="server" ImageUrl="~/imagenes/Procesos/calendario.png"
                                                Width="16px" />
                                            <ajax:MaskedEditExtender ID="MExtFchFin" runat="server" CultureAMPMPlaceholder=""
                                                CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                                                CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                                Enabled="True" Mask="99/99/9999" MaskType="Date" TargetControlID="txtFchFin"
                                                UserDateFormat="DayMonthYear">
                                            </ajax:MaskedEditExtender>
                                            <ajax:CalendarExtender ID="CExtFchFin" runat="server" Format="dd/MM/yyyy" PopupButtonID="imgFchFin"
                                                TargetControlID="txtFchFin">
                                            </ajax:CalendarExtender>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    <asp:Button ID="btnBuscar" runat="server" SkinID="btnNormalSkin" Text="Buscar" />
                                </td>
                                <td width="10">
                                    <asp:Button ID="btnLimpiar" runat="server" Text="Limpiar" SkinID="btnNormalSkin" />
                                </td>
                                <td width="10">
                                    <asp:Button ID="btnExportar" runat="server" Text="Exportar" SkinID="btnNormalSkin" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label94" runat="server" Text="Cliente :" SkinID="lblNormal"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td colspan="5">
                                    <asp:UpdatePanel ID="upCliente" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <input id="txtCliente" runat="server" autocomplete="off" type="text" class="CsstxtNormal"
                                                style="width: 429px" onkeypress="return validarSoloLetras(event);" maxlength="55" />
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                                <td width="10">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div>
                            <!--EXTGRIDVIEW-->
                            <asp:UpdatePanel ID="upnSeparacionVenta" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div id="Div2" class="DivPanelGrilla" runat="server">
                                        <exGV:ExtGridView ID="egvSeparacionVenta" runat="server" CssClass="EditarGridView"
                                            Width="100%" EnableViewState="False" CollapseButtonText="<img src='../Imagenes/Tree/collapse.png' alt='Comprimir' border='0'/>"
                                            ExpandButtonText="<img src='../Imagenes/Tree/expand.png' alt='Expandir' border='0' />"
                                            GridLines="Both" CellPadding="3" DataKeyNames="idSeparacionVenta" AutoGenerateColumns="False"
                                            ForeColor="#000000" AllowPaging="True" PageSize="17">
                                            <Columns>
                                                <%--<asp:BoundField DataField="descProyecto" HeaderText="Proyecto">
<ItemStyle HorizontalAlign="Left" Width="12%" Height="20px"></ItemStyle>
</asp:BoundField>--%>
                                                <%-- <asp:BoundField DataField="descEtapa" HeaderText="Etapa">
<ItemStyle HorizontalAlign="Left" Width="12%" Height="20px"></ItemStyle>
</asp:BoundField>--%>
                                                <asp:BoundField DataField="idSeparacionVenta" HeaderText="Uid">
                                                    <ItemStyle HorizontalAlign="Center" Width="3%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="fchVenta" HeaderText="F. Venta" HtmlEncode="False" DataFormatString="{0:dd/MM/yyyy}">
                                                    <ItemStyle HorizontalAlign="Center" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="nombreCompletosClienteOrRazonSocial" HeaderText="Nombre / Razón Social">
                                                    <ItemStyle HorizontalAlign="Left" Width="16%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="tpoDocumentoNumero" HeaderText="Documento Nº">
                                                    <ItemStyle HorizontalAlign="Left" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="TelefonosCliente" HeaderText="Teléfonos">
                                                    <ItemStyle HorizontalAlign="Left" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="totalPrecioVenta" HeaderText="T. Precio Venta" HtmlEncode="False"
                                                    DataFormatString="{0:###,##0.00}">
                                                    <ItemStyle HorizontalAlign="Right" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="totalSeparacion" HeaderText="T. Separación" HtmlEncode="False"
                                                    DataFormatString="{0:###,##0.00}">
                                                    <ItemStyle HorizontalAlign="Right" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <%--<asp:BoundField DataField="fchSeparacion" HeaderText="Fecha Separación" HtmlEncode="False"
DataFormatString="{0:dd/MM/yyyy}">
<ItemStyle HorizontalAlign="Center" Width="7%" Height="20px"></ItemStyle>
</asp:BoundField>--%>
                                                <asp:BoundField DataField="ctaInicial" HeaderText="Cuota Inicial">
                                                    <ItemStyle HorizontalAlign="Right" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="financiamiento" HeaderText="Saldo de Precio">
                                                    <ItemStyle HorizontalAlign="Right" Width="7%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="descFormaPago" HeaderText="Forma Pago">
                                                    <ItemStyle HorizontalAlign="Left" Width="8%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="descEntidadFin" HeaderText="Entidad Financiera">
                                                    <ItemStyle HorizontalAlign="Left" Width="8%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="fchVencimiento" HeaderText="F. Vencimiento" HtmlEncode="False"
                                                    DataFormatString="{0:dd/MM/yyyy}">
                                                    <ItemStyle HorizontalAlign="Center" Width="6%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:BoundField DataField="observacion" HeaderText="Observación" HtmlEncode="False">
                                                    <ItemStyle HorizontalAlign="Center" Width="10%" Height="20px"></ItemStyle>
                                                </asp:BoundField>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <div id="Div3" class="DivPanelGrilla" style="width: 100%;">
                                                            <exGV:ExtGridView ID="egvDetalleSeparacion" runat="server" CssClass="EditarGridView"
                                                                Width="100%" EnableViewState="False" CollapseButtonText="<img src='../Imagenes/Tree/collapse.png' alt='Comprimir' border='0'/>"
                                                                ExpandButtonText="<img src='../Imagenes/Tree/expand.png' alt='Expandir' border='0' />"
                                                                CellPadding="3" DataKeyNames="idSeparacionVentaDetalle" AutoGenerateColumns="False"
                                                                ForeColor="Black">
                                                                <Columns>
                                                                    <asp:BoundField DataField="idSeparacionVenta" Visible="false"></asp:BoundField>
                                                                    <asp:BoundField DataField="idSeparacionVentaDetalle" Visible="false"></asp:BoundField>
                                                                    <asp:BoundField DataField="descEdificio" HeaderText="Edificio" HtmlEncode="False">
                                                                        <ItemStyle HorizontalAlign="Center" Width="13%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="nomModelo" HeaderText="Modelo" HtmlEncode="False">
                                                                        <ItemStyle HorizontalAlign="Center" Width="13%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="descTpoInmueble" HeaderText="Descripción Inmueble" HtmlEncode="False">
                                                                        <ItemStyle HorizontalAlign="Center" Width="13%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="nroInmueble" HeaderText="Nº Inmueble">
                                                                        <ItemStyle HorizontalAlign="Center" Width="13%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="valorVenta" HeaderText="Valor Venta" DataFormatString="{0:###,##0.00}">
                                                                        <ItemStyle HorizontalAlign="Right" Width="10%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="precioVenta" HeaderText="Precio Venta" DataFormatString="{0:###,##0.00}">
                                                                        <ItemStyle HorizontalAlign="Right" Width="10%" Height="20px"></ItemStyle>
                                                                    </asp:BoundField>
                                                                </Columns>
                                                                <RowStyle CssClass="RowStyleGridView" />
                                                                <PagerStyle CssClass="PagerStyleGridView" />
                                                                <HeaderStyle CssClass="colGrilla" HorizontalAlign="Center" />
                                                                <AlternatingRowStyle CssClass="AlternatingRowStyleGridView" />
                                                            </exGV:ExtGridView>
                                                        </div>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <RowStyle CssClass="RowStyleGridView" />
                                            <PagerStyle CssClass="PagerStyleGridView" HorizontalAlign="Center" />
                                            <HeaderStyle CssClass="colGrilla" HorizontalAlign="Center" />
                                            <AlternatingRowStyle CssClass="AlternatingRowStyleGridView" />
                                        </exGV:ExtGridView>
                                    </div>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="btnBuscar" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="btnLimpiar" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table style="width: 30%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="1">
                                    &nbsp;
                                </td>
                                <td class="style1">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="1">
                                </td>
                                <td class="style1">
                                    <asp:Label ID="Label29" runat="server" SkinID="lblNormalNegrita" Text="Cantidad Total de Ventas"></asp:Label>
                                </td>
                                <td>
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <ContentTemplate>
                                            <asp:Label ID="lblCantidadTotalSeparación" runat="server" SkinID="lblNormal">: 0</asp:Label>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td width="1">
                                </td>
                                <td class="style1">
                                    <asp:Label ID="Label30" runat="server" SkinID="lblNormalNegrita" Text="Monto Total de Precio Venta"></asp:Label>
                                </td>
                                <td>
                                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                        <ContentTemplate>
                                            <asp:Label ID="lblTotalPrecioVenta" runat="server" SkinID="lblNormal">: 0.00</asp:Label>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td width="1">
                                    &nbsp;
                                </td>
                                <td class="style1">
                                    &nbsp;&nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </asp:Panel>
</asp:Content>
